package org.smart4j.framework.bean;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

public class Request {

    private String requestMethod;

    private String requestPath;

    public Request(String requestMethod,String requestPath){
        this.requestMethod = requestMethod;
        this.requestPath = requestPath;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public String getRequestPath() {
        return requestPath;
    }

    @Override
    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (o == null || getClass() != o.getClass()) return false;
//        Request request = (Request) o;
//        return Objects.equals(requestMethod, request.requestMethod) &&
//                Objects.equals(requestPath, request.requestPath);
        return EqualsBuilder.reflectionEquals(this,o);
    }

    @Override
    public int hashCode() {
        //return Objects.hash(requestMethod, requestPath);
        return HashCodeBuilder.reflectionHashCode(this);
    }
}
